import sys

from PySide6.QtCore import QDateTime, QTimer
from PySide6.QtGui import Qt
from PySide6.QtWidgets import QWidget, QApplication, QLabel, QPushButton, QGridLayout


class LearnQThread(QWidget):
    def __init__(self):
        super().__init__()
        self.timer = QTimer()
        self.timer.timeout.connect(self.showtime)
        self.timer.start(100)

    """
    
    QTimer定时处理的任务
    
    """

    def showtime(self):
        # 获取当前时间
       print("run")




if __name__ == '__main__':
    app = QApplication(sys.argv)
    wid = LearnQThread()
    wid.show()
    sys.exit(app.exec())
